<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
<link href="video-orch.css" rel="stylesheet" type="text/css" />
<title>Simple G+ Hangout App</title>
</head>
<body>
	<h2>Simple G+ Hangout App</h2>

	<section id='section_sessions'>
	<hr size="1" />
	<h3>Hangout sessions</h3>
	<c:choose>
		<c:when test="${requestScope['hangoutUrl'] != null}">
			<form id="form_sessions" name="form_sessions" action="index" method="GET">
				<table>
					<c:forEach var="val" items="${requestScope['hangoutUrl']}">
						<tr>
							<td>				
								<a href="${val}" target="_blank"><c:out value="${val}" /></a>
							</td>
							<td>
								<input type="hidden" name="hangoutUrl" value="${val}"/>
								<input type="submit" name="command" value="delete" accept="" />
							</td>
						</tr>
					</c:forEach>
				</table>
			</form>		
		</c:when>
		<c:otherwise>
			No G+ Hangout sessions initiated. Start one <a href="https://code.google.com/apis/console/b/0/?pli=1#project:907053901423:hangout" target="_blank">here</a>.
		</c:otherwise>
	</c:choose>
	</section>

	
	<section id="section_reference">
	<hr size="1" />
	<h3>Reference</h3>
	<p>G+ Hangout API is available <a href="https://developers.google.com/+/hangouts/reference" target="_blank">here</a>.</p>
	</section>
		
	<!--
	<section id="section_debug">
	<hr size="1" />
	<h3>Debug</h3>
	<p>"requestScope":</p>
	<c:forEach items="${requestScope}" var="entry">
		<c:out value="${entry.key}" /> = <c:out value="${entry.value}" />
		<br />
	</c:forEach>

	<p>"param":</p>
	<c:forEach items="${param}" var="entry">
		<c:out value="${entry.key}" /> = <c:out value="${entry.value}" />
		<br />
	</c:forEach>
	</section>
	-->

	<footer>
	<hr size="1" />
	Version: <c:out value="${requestScope['version']}" /> <br />
	</footer>
</body>
</html>